package org.jeecg.modules.demo.ch.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.ch.entity.ChDailyRecordDetails;

import java.util.List;

/**
 * @Description: 每日记录明细表
 * @Author: jeecg-boot
 * @Date:   2022-11-29
 * @Version: V1.0
 */
public interface ChDailyRecordDetailsMapper extends BaseMapper<ChDailyRecordDetails> {

  /**
   * 通过主表id删除子表数据
   *
   * @param mainId 主表id
   * @return boolean
   */
	public boolean deleteByMainId(@Param("mainId") String mainId);

  /**
   * 通过主表id查询子表数据
   *
   * @param mainId 主表id
   * @return List<ChDailyRecordDetails>
   */
	public List<ChDailyRecordDetails> selectByMainId(@Param("mainId") String mainId);

    /**
     * 根据姓名获取本周所有项
     * @param realName
     * @return
     */
    List<ChDailyRecordDetails> getThisWeekAllItemByName(@Param("realName") String realName,@Param("beginTime") String beginTime,@Param("endTime") String endTime);
}
